<#if isWithPackage?exists && isWithPackage==true>package ${packageName}.entity.${localPackagePre};</#if>

<#if isAutoImport?exists && isAutoImport==true>
<#if isLombok?exists && isLombok==true>import lombok.Data;</#if>
import java.util.List;
import java.io.Serializable;
import javax.persistence.*;
<#if isSwagger?exists && isSwagger==true>
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;</#if>
</#if>
import java.util.Date;
import com.shiji.msboot.entity.OperatorEntity;
import com.shiji.msboot.data.annotation.TablePrimaryKey;
import javax.validation.constraints.NotNull;
import com.shiji.msboot.data.annotation.DefaultValue;
<#if fieldItem.isHaveSize>
import javax.validation.constraints.Size;
</#if>
/**
 * @description ${classInfo.classComment}
 * @author ${authorName}
 * @date ${.now?string('yyyy-MM-dd')}
 */
<#if isLombok?exists && isLombok==true>@Data</#if>
<#if isComment?exists && isComment==true>
@TableName("${classInfo.originTableName}")
</#if>
<#if isSwagger?exists && isSwagger==true>
@ApiModel("${classInfo.classComment}")
</#if>
@TablePrimaryKey(keys = {${classInfo.idxField}})
public class ${classInfo.className} extends OperatorEntity {
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
<#list classInfo.fieldList as fieldItem >
    <#if fieldItem.fieldName!="creator" && fieldItem.fieldName!="createtime" && fieldItem.fieldName!="modifier"
    && fieldItem.fieldName!="modifytime" && fieldItem.fieldName!="entid" && fieldItem.fieldName!="id"
    && fieldItem.fieldName!="dbsplitcode" >
        <#if isComment?exists && isComment==true>
        /**
        * ${fieldItem.fieldComment}
        */
        </#if>
        <#if isFiel?exists && isFiel==true>
        <#if fieldItem.isHaveDefult>
        @DefaultValue(value = "${fieldItem.defultValue}")
        </#if>
        <#if fieldItem.isHaveSize>
        @Size(max = ${fieldItem.size}, message = "${fieldItem.fieldName}:${fieldItem.fieldComment}:长度不能大于${fieldItem.size}")
        </#if>
        <#if fieldItem.isNumHaveSize>
        @NumberSize(max = ${fieldItem.numsize}, message = "${fieldItem.fieldName}:${fieldItem.fieldComment}:长度不能大于${fieldItem.numsize}")
        </#if>
        <#if fieldItem.isNotNull && !fieldItem.isHaveDefult>
        @NotNull(message = "${fieldItem.fieldName}:${fieldItem.fieldComment}:不能为空")
        </#if>
        <#if isSwagger?exists && isSwagger==true && !fieldItem.isNotNull>
        </#if>
        @ApiModelProperty("${fieldItem.fieldComment}")
        </#if>
        <#if isSwagger?exists && isSwagger==true && fieldItem.isNotNull>
        @ApiModelProperty(value = "${fieldItem.fieldComment}",required = true)
        </#if>
        private ${fieldItem.fieldClass} ${fieldItem.fieldName};
    </#if>
</#list>
</#if>

<#if isLombok?exists && isLombok==false>
    public ${fieldItem.fieldClass} get${fieldItem.fieldName?cap_first}() {
        return ${fieldItem.fieldName};
    }

    public void set${fieldItem.fieldName?cap_first}(${fieldItem.fieldClass} ${fieldItem.fieldName}) {
        this.${fieldItem.fieldName} = ${fieldItem.fieldName};
    }
</#if>
}
